<!-- 自定义通用推窗组件 -->
<template>
  <a-drawer
    placement="right"
    width="40%"
    :bodyStyle="{
      height: 'calc(100vh - 104px)',
      overflow: 'auto',
    }"
    v-bind="$attrs"
  >
    <slot></slot>
    <div
      :style="{
        borderTop: '1px solid #e8e8e8',
        borderRadius: '0 0 4px 4px',
      }"
      class="absolute bottom-0 left-0 w-[100%] bg-white text-right pl-3 pr-3 pb-2 pt-2"
    >
      <slot name="footer"></slot>
    </div>
  </a-drawer>
</template>

<script lang="ts">
import { defineComponent } from "vue";
import { Drawer } from "ant-design-vue";

export default defineComponent({
  name: "BaseDrawer",
  components: {
    "a-drawer": Drawer,
  },
});
</script>
